<style>
	table{
		font-size:12px;
		border-collapse:collapse;
		width:100%;
	}
	a{
		text-decoration:none;
		color:#00;
	}
	
	tr.total td{
		font-weight:bold;
		border-top:1px solid #000;
		border-bottom:1px solid #000;
	}
	
	td{
		text-align:left;
		padding:1px 2px;
	}
	
	tr.success td{
		font-weight:bold;
	}
	
	thead tr th{
		font-weight:bold;
		border-bottom:1px solid #000;
		border-top:1px solid #000;
		text-align:left;
	}
	
	td.for-doc{
		width:110px;
		font-size:12px;
	}
	td.for-block{
		width:60px;
		font-size:12px;
	}
	
	td.name{
		font-size:13px;
	}
</style>
<table>
	<tr>
		<td style="font-size:20; text-align:center;font-weight:bold;"><?=$school_name;?></td>
	</tr>
	<tr>
		<td style="font-size:12px; text-align:center;font-weight:bold;">LIST OF ENROLLED STUDENT(S)</td>
	</tr>
	<tr>
		<td style="font-size:12px; text-align:center;font-weight:bold;">School Year: <?=$school_year;?></td>
	</tr>
	<tr>
		<td style="font-size:12px; text-align:center;font-weight:bold;"><?=$print_title;?></td>
	</tr>
</table>
<?
	function gender($x){
		return strtolower($x) == 'male' ? 'M' : 'F';
	}
?>

<table class="table table-bordered">
	<thead>
		<tr>
			<th>NAME</th>
			<th>Level</th>
			<th>SSP Number</th>
			<th>VISA Status</th>
			<th>Authorized Stay</th>
			<th>Passport Number</th>
			<th>I-Card No</th>
			<th>Date Of Issue</th>
			<th>Present Address</th>
		</tr>
	</thead>
	<?if($students):?>
		<?foreach($students as $dk => $dv):?>
			<tr class="success">
				<th colspan="9" style="text-indent:25px;padding:10px 0 0 0;"><?=strtoupper($dvk);?></th>
			</tr>
			<tr>
				<td><?=ucwords(strtolower($dv->fullname));?></td>
				<td><?=ucwords($dv->level_desc);?></td>
				<td><?=ucwords($dv->ssp_stat);?></td>
				<td><?=ucwords($dv->visa_stat);?></td>
				<td><?=ucwords($dv->auth_stay);?></td>
				<td><?=ucwords($dv->pass_no);?></td>
				<td><?=ucwords($dv->card_no);?></td>
				<td><?=ucwords($dv->date_issued);?></td>
				<td><?=ucwords($dv->present_address);?></td>
			</tr>
		<?endforeach;?>
	<?else:?>
	<?endif;?>
</table>